﻿using CefSharp.WinForms;
using Sunny.UI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Center.WebUI
{
    public partial class Form1 : UIForm
    {
        public ChromiumWebBrowser browser { get; set; }
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

            //browser = new ChromiumWebBrowser();
            //browser.Dock = DockStyle.Fill;
            ////browser.Load("http://main.yunlipin.com.cn/center").Wait();
            //new Task(() =>
            //{
            //    this.init();
            //}).Start();
            browser = new ChromiumWebBrowser("http://main.yunlipin.com.cn/center");
            this.Controls.Add(browser);
        }

        private async void init()
        {
            await browser.LoadPageAsync("http://main.yunlipin.com.cn/center");
        }

    }
}
